c program to sort the array in an ascending order